<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {

    /**
     * 后台首页
     * @return [type] [description]
     */
    public function index()
    {
        session_start();
        $this->load->library('authority');
        $this->load->library('common');

        //base_url链接
        $this->load->helper('url');
        $base=$this->config->item('base_url');

        if(!$this->authority->is_exist($_SESSION['user'])){
            $msg='请先登录!';
            redirect("admin/user/index?msg=$msg");
        }

        //加载头尾文件
        $this->load->view('admin/header',array('base'=>$base));
        $this->load->view('admin/home');
        $this->load->view('admin/footer');
    }
}